import React, { useRef, useEffect, forwardRef } from 'react'
import { useGLTF, useAnimations } from '@react-three/drei'

const FeedingInlet = forwardRef((props, ref) => {
  const { nodes, materials, animations } = useGLTF('/models/feedingInlet.glb')
  const { actions } = useAnimations(animations, ref)
  useEffect(() => {
    for (const k in actions) {
      actions[k].play()
    }
  }, [actions]);
  return (
    <group visible={false} ref={ref} scale={0.001} dispose={null} >
      <group scale={0.149} position={[-3, 0, 0]}>
        <mesh geometry={nodes.pCylinder14.geometry} material={materials.PaletteMaterial001} position={[-15.989823, 0.287601, -4.139647]} rotation={[Math.PI / 2, 0, 0]} scale={0.562587} />
      </group>
    </group>
  )
})

useGLTF.preload('/models/feedingInlet.glb')

export default FeedingInlet;
